package com.mapper;

import com.pojo.House;
import com.vo.HouseVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface HouseMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(House record);

    int insertSelective(House record);

    House selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(House record);

    int updateByPrimaryKey(House record);

    /**
     * 查询所有的房屋
     * @param houseVo
     * @return
     */
   public List<House> selectHouseall(HouseVo houseVo);

    /**
     * 根据楼栋id查询房间数量
     */
    public  int selectcountbyfloorid(int id);
    /**
     * 租赁统计
     */

    public List<House> selectzuByHouse(HouseVo houseVo);
    /**
     * 根据id查询
     */
    House selecthouseByid(Integer id);


    /**
     * 根据id 修改状态
     */
    public int updatestateByid(@Param("state") Integer state ,@Param("id") Integer id ,@Param("ownerid") Integer ownerid);
    /**
     * 根据业主id查询
     */
    public int selecthouseByownerid(Integer id);
    /**
     * 根据id 修改状态
     */
    public int updatestateByids(@Param("state") Integer state ,@Param("id") Integer id );

    /**
     * 查询总户数
     */
    public  int selecttotalhouse(Integer plotid);

    /**
     * 查询转租的数量
     */

    public int selecttotalzuanzu(Integer plotid);
}